Skip to content

[minor] drop 3.9 in favour of 3.13 #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 8, 2025
Merged

[minor] drop 3.9 in favour of 3.13 #36

merged 11 commits into from
May 8, 2025

Conversation

liamhuber
Copy link
Member

@liamhuber liamhuber commented Mar 17, 2025

In lieu of 3.9

If the tests pass (I don't anticipate a reason they wouldn't), the support bounds can be changed accordingly

In lieu of 3.9
Copy link

Binder 👈 Launch a binder notebook on branch pyiron/pyiron_snippets/liamhuber-patch-1

Copy link

codacy-production bot commented Mar 17, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (c2205d5) 560 532 95.00%
Head commit (941a08d) 560 (+0) 532 (+0) 95.00% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#36) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@coveralls
Copy link

coveralls commented Mar 17, 2025

Pull Request Test Coverage Report for Build 13907416732

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.0%

Totals Coverage Status
Change from base Build 13888350067: 0.0%
Covered Lines: 532
Relevant Lines: 560

💛 - Coveralls

@liamhuber liamhuber mentioned this pull request Mar 17, 2025
@jan-janssen
Copy link
Member

jan-janssen commented Mar 17, 2025

The coveralls python package does not support Python 3.13 yet. TheKevJames/coveralls-python#549 Is it required? Or is it possible to replace it with the coveralls GitHub action https://github.com/coverallsapp/github-action

liamhuber added 2 commits May 7, 2025 17:53
# Conflicts:
#	.github/workflows/push-pull.yml
Signed-off-by: liamhuber <[email protected]>
@liamhuber liamhuber changed the title Test 3.13 [minor] drop 3.9 in favour of 3.13 May 8, 2025
Copy link

codecov bot commented May 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.00%. Comparing base (288377c) to head (2d6c7ac).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #36   +/-   ##
=======================================
  Coverage   95.00%   95.00%           
=======================================
  Files          13       13           
  Lines         560      560           
=======================================
  Hits          532      532           
  Misses         28       28           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@liamhuber
Copy link
Member Author

Ah darnit, the codacy and coveralls env files are still getting included. I was just too sloppy verifying pyiron/actions#146 and there must still be a little bug. I'll fix it tomorrow.

Signed-off-by: liamhuber <[email protected]>
@liamhuber
Copy link
Member Author

The action itself was (correctly) still maintaining the old env files by default, so in pyiron/actions#147 I just manually turned it off in the reusable workflows whenever we're not actually trying to calculate coverage.

@liamhuber
Copy link
Member Author

The coverage env issues are resolved; 3.13 alone is failing with an exception that is new to me:

Run pip install --no-deps . --no-build-isolation
  pip install --no-deps . --no-build-isolation
  shell: /usr/bin/bash -l {0}
  env:
    WRITE_ENVIRONMENT_OUTPUT_ENV_FILE: ./environment.yml
    INPUT_RUN_POST: true
    CONDA: /home/runner/miniconda3
Processing /home/runner/work/pyiron_snippets/pyiron_snippets
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
ERROR: Exception:
Traceback (most recent call last):
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/cli/base_command.py", line 105, in _run_wrapper
    status = _inner_run()
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/cli/base_command.py", line 96, in _inner_run
    return self.run(options, args)
           ~~~~~~~~^^^^^^^^^^^^^^^
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/cli/req_command.py", line 68, in wrapper
    return func(self, options, args)
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/commands/install.py", line 387, in run
    requirement_set = resolver.resolve(
        reqs, check_supported_wheels=not options.target_dir
    )
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 77, in resolve
    collected = self.factory.collect_root_requirements(root_reqs)
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 545, in collect_root_requirements
    reqs = list(
        self._make_requirements_from_install_req(
    ...<2 lines>...
        )
    )
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 501, in _make_requirements_from_install_req
    cand = self._make_base_candidate_from_link(
        ireq.link,
    ...<2 lines>...
        version=None,
    )
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 233, in _make_base_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
                                       ~~~~~~~~~~~~~^
        link,
        ^^^^^
    ...<3 lines>...
        version=version,
        ^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 306, in __init__
    super().__init__(
    ~~~~~~~~~~~~~~~~^
        link=link,
        ^^^^^^^^^^
    ...<4 lines>...
        version=version,
        ^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 159, in __init__
    self.dist = self._prepare()
                ~~~~~~~~~~~~~^^
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 236, in _prepare
    dist = self._prepare_distribution()
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 317, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/operations/prepare.py", line 532, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/operations/prepare.py", line 647, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
        req,
    ...<3 lines>...
        self.check_build_deps,
    )
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/operations/prepare.py", line 71, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        finder, build_isolation, check_build_deps
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/distributions/sdist.py", line 69, in prepare_distribution_metadata
    self.req.prepare_metadata()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/req/req_install.py", line 575, in prepare_metadata
    self.metadata_directory = generate_metadata(
                              ~~~~~~~~~~~~~~~~~^
        build_env=self.build_env,
        ^^^^^^^^^^^^^^^^^^^^^^^^^
        backend=self.pep517_backend,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        details=details,
        ^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/operations/build/metadata.py", line 34, in generate_metadata
    distinfo_dir = backend.prepare_metadata_for_build_wheel(metadata_dir)
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_internal/utils/misc.py", line 723, in prepare_metadata_for_build_wheel
    return super().prepare_metadata_for_build_wheel(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        metadata_directory=metadata_directory,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        config_settings=cs,
        ^^^^^^^^^^^^^^^^^^^
        _allow_fallback=_allow_fallback,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 224, in prepare_metadata_for_build_wheel
    return self._call_hook(
           ~~~~~~~~~~~~~~~^
        "prepare_metadata_for_build_wheel",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<4 lines>...
        },
        ^^
    )
    ^
  File "/home/runner/work/pyiron_snippets/pyiron_snippets/cached-miniforge/my-env/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 402, in _call_hook
    raise BackendUnavailable(
    ...<4 lines>...
    )
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Cannot import 'setuptools.build_meta'

@liamhuber
Copy link
Member Author

I find this rather confusing, as it complains about the availability of setuptools.build_meta, but the head of my pyproject.toml suggests this should be available:

[build-system]
requires = [
    "setuptools",
    "versioneer[toml]==0.29",
]
build-backend = "setuptools.build_meta"

@jan-janssen, I peeked at executorlib for a reference, but your pyproject file looks quite similar (and identical in terms of setuptools and the build-backend), yet works fine on 3.13. Have you seen this error before?

@liamhuber
Copy link
Member Author

I didn't find anything similar on a web search; I tried re-running; I tried deleting the p3.13 cache and re-running. Unfortunately, no progress.

@@ -1,4 +1,4 @@
channels:
- conda-forge
dependencies:
- python >=3.9,<3.13
- python >=3.10,<3.14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- python >=3.10,<3.14
- python >=3.10,<3.14
- setuptools

@@ -7,4 +7,4 @@ dependencies:
- sphinx-gallery
- sphinx-rtd-theme
- versioneer
- python >=3.9,<3.13
- python >=3.10,<3.14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- python >=3.10,<3.14
- setuptools
- python >=3.10,<3.14

@jan-janssen
Copy link
Member

I didn't find anything similar on a web search; I tried re-running; I tried deleting the p3.13 cache and re-running. Unfortunately, no progress.

It might be just missing setuptools in the environment.yml.

@liamhuber
Copy link
Member Author

Yeah, I was just poking deeper and see setuptools is pinned in your env file

@liamhuber
Copy link
Member Author

I didn't find anything similar on a web search; I tried re-running; I tried deleting the p3.13 cache and re-running. Unfortunately, no progress.

It might be just missing setuptools in the environment.yml.

Thank you for the pointer. I let the bot handle the changes rather than the suggestions, but this was indeed the issue.

It turns out that since there are so many build tools available now conda-forge is no longer packaging setuptools and wheel by default. I'll go through the rest of the release process for snippets and then give a little report on Monday.

@liamhuber liamhuber merged commit a2694e0 into main May 8, 2025
21 checks passed
@liamhuber liamhuber deleted the liamhuber-patch-1 branch May 8, 2025 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants